Conversation
This path avoids the sources getting wiped out during `mvn clean`, since they are not generated during the maven build. This patch also moves the generated WASM build under src/main/wasm since it is really a source file and not a test file. It will not be included in the built artifact.
|
The archive of the sources generated specifically for TruffleRuby could be moved to a separate job if that would be cleaner. |
|
Could Loader.java and Nodes.java simply be in |
| jar --create --file java/prism-truffleruby-sources.jar -C java/api/src/main/java `ls -r java/api/src/main/java` | ||
| jar --update --file java/prism-truffleruby-sources.jar -C java/api/src/main/java-templates `ls -r java/api/src/main/java-templates` | ||
| jar --update --file java/prism-truffleruby-sources.jar -C java/native/src/main/java `ls -r java/native/src/main/java` |
There was a problem hiding this comment.
I appreciate the thought and effort but it's better to directly copy files from my Prism checkout, that way it also works if e.g. I have some local changes in Prism I'm testing in TruffleRuby.
So this can be removed.
| package org.ruby_lang.prism; | ||
| package org.ruby_lang.prism.jni; | ||
|
|
||
| public abstract class Parser { |
There was a problem hiding this comment.
This class, which is the only class under java/native doesn't really do anything currently.
Notably the corresponding C code is not here, it's in https://github.com/truffleruby/truffleruby/blob/master/src/main/c/yarp_bindings/src/yarp_bindings.c.
Maybe we should actually remove this class? Or import the C file here?
If the C file would get compiled in CI that could be nice, as it'd catch cases that it needs to be updated, e.g. with the recent changes in the C API.
OTOH this is an area where usages might want different things (e.g. how the reading is done, maybe from a file/using mmap/etc), and notably truffleruby compiles that .c file together with libprism.a.
I'd tend to say the simplest is to just remove this file, but then maybe there is an issue because java/native is empty?
Based on review comments from #4031 I've made a few additional tweaks.
src/main/java-templatesso they are not deleted bymvn clean.src/main/wasmsince it is an input to the build (and not a test resource as before).